﻿using BussinessObject.ObjectOne;
using Class_Entity.ObjectTwo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectHK3
{
    public partial class NEWS : System.Web.UI.Page
    {
        private int newsId;
        B_News ex = new B_News();
        C_News fx = new C_News();
        protected void Page_Load(object sender, EventArgs e)
        {
            newsId = Convert.ToInt32(Request.QueryString["newsId"].ToString());
            if (!IsPostBack)
            {
                load();
            }
        }
        public void load()
        {
            fx = ex.LoadNews(newsId);
            _lblTitle.Text = fx.TITLE.ToString();
            _ltrSubject.Text = fx.SUBJECT.ToString();

            _ltrBody.Text = fx.BODY.ToString();
            _lblCreateDate.Text = "Page last updated at: " + fx.CREATE_DATE.ToString();

        }

    }
}